package com.parfinex.java.phase1.module2.task09;

/**
 * @Author: Li Jiahui
 * @Date: 2020/10/18 13:43
 * @Version 1.0
 */
//使用implements关键字表达实现的关第
public class Gold implements Metal, Money {
    @Override
    public void shine() {
        System.out.println("发出了金黄色的光芒……");
    }

    @Override
    public void buy() {
        System.out.println("买了好多好吃的东西");

    }

    public static void main(String[] args) {
        // 声明接口类型的引用指向实现类的对象，形成了多态
        Metal mt = new Gold();
        mt.shine();
        Money my = new Gold();
        my.buy();
    }
}
